Azure resource groups
This is Part 5 of Azure Tutorial. In this article we will understand Azure Resources and Resource Groups.
What are Azure Resources
Resources are instances of azure services that you create, like virtual machines, app services, storage accounts, SQL databases, function apps etc. All these are azure services. Everytime you create an instance of a service, you are creating a resource. There are hundereds of azure services.
You can see the complete list of azure services by navigating to https://portal.azure.com/#allservices. You need to login to the azure portal, otherwise it will redirect you to the login page.
On the left you see the service categories like General, Compute, Networking, Storage etc. For example if you want to create a storage account to store your data, click on the Storage category and you will see all the services related to Storage.
Anytime you create a resource, you also need to specify a resource group.
What is an Azure Resource Group
As the name implies, a Resource Group is a group of azure resources like virtual machines, app services, storage accounts, SQL databases etc. It's a logical container for grouping related azure resources.
Azure Resource Group Example
Let's say we are developing a web application. There are several ways to do this. To keep this example simple, let's just assume we need the following 3 azure resources.
- Virtual Machine - To host and run our web application
- Storage Account - To store images, videos and other resources that our web application needs
- SQL database - To store our application data
Let's say for this example sake we have the following environments. Most organisations have these deployment environments.
- Development
- Testing
- Staging
- PreProduction
- Production
Let's say our web application name is PragimTech.com. We might create the following 4 resource groups, one for each environment.
- rg-pragimtech-development
- rg-pragimtech-staging
- rg-pragimtech-preproduction
- rg-pragimtech-production
We have the following naming pattern here. The prefix rg stands for resource group.
rg-<applicationName>-<deploymentEnvironment>
Grouping by deployment environment is just one way of grouping. Obviously you can group resources any way you want. Anyway that makes sense to your oragnisation really.
- By department,
- By country,
- By application,
- By resource type or a
- Combination of these
In general, resources that share the same deployment lifecycle are grouped, so these resources can be easily provisioned i.e created, deployed, updated, and deleted as a single unit. There are several benefits of grouping resources. We will discuss the benefits of resource groups in our next article.
© 2020 Pragimtech. All Rights Reserved.